﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;


namespace ASEPMainProgram.Entities.MainFrame
{
    /// <summary>
    /// 树节点实体
    /// </summary>
    public class TreeNodeEntity
    {
        /// <summary>
        /// 节点id
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        [Column(TypeName = "varchar(32)")]
        public string NodeId { get; set; }
        /// <summary>
        /// 节点名称
        /// </summary>
        [Column(TypeName = "varchar(32)")]
        public string NodeName { get; set; }
        /// <summary>
        /// 父节点id
        /// </summary>
        [Column(TypeName = "varchar(32)")]
        public string ParentNodeId { get; set; }
        /// <summary>
        /// 树id
        /// </summary>
        [Column(TypeName = "varchar(32)")]
        public string TreeId { get; set; }
        /// <summary>
        /// 注册组id
        /// </summary>
        [Column(TypeName = "varchar(32)")]
        public string RegGroupId { get; set; }
        /// <summary>
        /// 创建者
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string CreateBy { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Column(TypeName = "datetime")]
        public DateTime CreateOn { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Column(TypeName = "varchar(10)")]
        public string Level { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Column(TypeName = "varchar(10)")]
        public string State { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Column(TypeName = "varchar(255)")]
        public string Remark { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string DeptId { get; set; }
    }

    /// <summary>
    /// 用户状态
    /// </summary>
    public enum TreeStatus
    {
        /// <summary>
        /// 已禁用
        /// </summary>
        Forbidden = 0,
        /// <summary>
        /// 正常
        /// </summary>
        Normal = 1
    }
}
